Login
login(username?:string, password?:string): string
- The login function, like initialize, authenticates the user and stores the result into the embed cookie.
- The function returns the authentication token string.
Example
The following initializes a new embed client for the target instance of Pyramid and authenticates a new user "john"
var client = pyramidEmbedClient("https://analytics.pyramid.com"); client.init(); client.login("john","ab123!");